Skip to content

Fix full-page screenshots in some circumstances.#43

Open
benpickles wants to merge 1 commit into
twalpole:masterfrom
benpickles:fix-full-page-screenshot
Open

Fix full-page screenshots in some circumstances.#43
benpickles wants to merge 1 commit into
twalpole:masterfrom
benpickles:fix-full-page-screenshot

Conversation

@benpickles
Copy link
Copy Markdown

@benpickles benpickles commented Mar 5, 2020

Even adding just <!DOCTYPE html> to long_page.erb will kick Chrome into a different rendering mode but setting html's height to 100% seems to be the more reliable method.

Fixes #39.

Even adding just <!DOCTYPE html> to long_page.erb will kick Chrome into
a different rendering mode but setting html's height to 100% seems to be
the more reliable method.
@benpickles
Copy link
Copy Markdown
Author

So I just looked at an actual image from this and whilst the size of the output image is correct "below the fold" is blank/white.

I can't see that anything else is incorrect according to https://github.com/ChromeDevTools/devtools-protocol/blob/be5771fecba801dc93ab2a8e6260b2249270a7e8/types/protocol.d.ts#L9844-L9861 and https://github.com/ChromeDevTools/devtools-protocol/blob/be5771fecba801dc93ab2a8e6260b2249270a7e8/types/protocol.d.ts#L9713-L9734?

@twalpole
Copy link
Copy Markdown
Owner

twalpole commented Apr 4, 2020

Sorry for the delay in this - I've been really busy recently. I plan to update apparition to meet recent Capybara changes, but will hopefully get to this tomorrow

@twalpole
Copy link
Copy Markdown
Owner

twalpole commented Apr 6, 2020

Hmmm -- I see the issue -- not really sure how to fix, or if it is fixable - will require more research

@benpickles
Copy link
Copy Markdown
Author

Yes I agree though oddly it doesn't occur with Ferrum - they even fixed the same issue recently rubycdp/ferrum#51

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Taking a full size screenshot doesn't work

2 participants